package com.springboot.auth.authorization.provider;

import com.springboot.auth.authorization.entity.Role;
import com.springboot.auth.authorization.entity.User;
import com.springboot.cloud.common.core.entity.vo.Result;
import org.springframework.stereotype.Component;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@Component
public class OrganizationProviderFallback implements OrganizationProvider {

//    @Autowired
//    private PasswordEncoder passwordEncoder;
//    private String tokenId = "TOKEN-USER-";
//
//    @Resource
//    private RedisUtils redisUtils;

    @Override
    public Result<User> getUserByUniqueId(String uniqueId) {
        return Result.success(new User());
    }

    @Override
    public Result<User> getUserByOpenId(String openId) {
        return Result.success(new User());
    }

    @Override
    public Result<Set<Role>> queryRolesByUserId(String userId) {
        return Result.success(new HashSet<Role>());
    }

    @Override
    public String getSms(String mobile) {
        return "调用失败,服务降级";
    }


}
